/**产品库存管理-产品库-包邮商品API**/
import obj from '@/utils/request'
let {request,baseURL} = obj

//查询所有的包邮商品
export function getMailGoods(params) {
  return request({
    url: '/mailGoods',
    method: 'get',
    params
  })
}
//查询单个的包邮商品
export function getMailGoodsById(id) {
  return request({
    url: '/mailGoods/'+id,
    method: 'get',
  })
}
//添加包邮商品
export function mailGoodsAdd(data) {
  return request({
    url: '/mailGoods',
    method: 'post',
    data
  })
}
//修改商品类型
export function mailGoodsMod(data) {
  return request({
    url: '/mailGoods',
    method: 'put',
    data
  })
}
//删除包邮商品
export function mailGoodsDel(ids) {
  return request({
    url: '/mailGoods',
    method: 'delete',
    data:ids
  })
}
//禁用启用包邮商品
export function disableOrEnableMailGoods(stores,params) {
  return request({
    url: '/mailGoods/disableOrEnable',
    method: 'put',
    data:stores,
    params
  })
}

//下载模板文件
export function getMailGoodsTemplate() {
  return baseURL+'/mailGoods/template'
}

//选择文件
export function mailGoodsOperation(data) {
  return request({
    // baseURL: 'https://jsonplaceholder.typicode.com/posts/',
    url: '/mailGoods/multi/operation',
    method: 'post',
    data
  })
}
